#include<iostream>
using namespace std;
typedef long long LL;
int main()
{
	/*LL ans = 1;
	for (int i = 2; i <= 10; i++) {
		ans *= i;
	}
	int cnt = 0;
	LL ans1 = ans;
	for (int i = 1; i < 10000; i++) {
		cout << (LL)ans * i << endl;
	}*/
	//cout << cnt << endl;
	/*for (int i = 1; i <= 6000; i++) {
		bool flag = 0;
		for (int j = 2; j <= 10; j++) {
			if ((i % j) != 0)flag = 1;
		}
		if (!flag)cout << i << endl;
	}*/
	LL n;
	cin >> n;
	cout << n / 2520 << endl;
	return 0;
}